/**
 * 
 */
package com.sys.object.common;

import org.codehaus.jackson.annotate.JsonIgnoreProperties;

/**
 * @author Administrator
 *
 */
@JsonIgnoreProperties(ignoreUnknown=true)
public class ObjResultBase {

	public Integer ret=0;// 	值为0或1,为0表示当前没有错误，为1表示当前有错误
	public String msg;//错误描述
	public Integer msgcode=0;//错误代码(-1=表示授权有错误，0=无错或警告)
	public void setResultCode(ObjResultCode result){
		this.ret=ObjResultCode.OK.getCode().equals(result.getCode())?1:0;
		this.msg = result.getDesc();
		this.msgcode=result.getCode();
	}
	
	public void setResultCode(ObjResultCode result,String msg){
		this.ret=ObjResultCode.OK.getCode().equals(result.getCode())?1:0;
		this.msg = msg;
		this.msgcode=result.getCode();
	}
	
	public int getRet() {
		return ret;
	}
	public void setRet(int ret) {
		this.ret = ret;
	}
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}

	public Integer getMsgcode() {
		return msgcode;
	}

	public void setMsgcode(Integer msgcode) {
		this.msgcode = msgcode;
	}

	
}
